package com.qigao.mall.jdbc.mapper;

import com.qigao.mall.commons.dto.ItemQueryPageDto;
import com.qigao.mall.jdbc.model.TbItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TbItemMapper extends AbstractTbItemMapper{

    List<TbItem> selectByKeyWords(ItemQueryPageDto itemQueryPageDto);

    List<TbItem> selectByCatNo(@Param("catNo")String catNo,@Param("status")String status);

    void updateByItemNo(TbItem tbItem);

    TbItem selectByItemNo(String itemNo);

    List<TbItem> randomItem(@Param("startIndex") int startIndex, @Param("showNum")int showNum, @Param("shopNo")String shopNo);

    int countTotal(String shopNo);

    List<TbItem> selectByStatus(@Param("shopNo")String shopNo,@Param("status")String status);

    void subItemStockNum(String orderNo);

    void deleteByItemNo(String itemNo);
}